//Game manager for DirectX game

#ifndef DXGAME_H
#define DXGAME_H

#include <windows.h>
#include "game.h"
#include "dxgamegraphic.h"
#include "dxgameinput.h"
//#include "dxgamesound.h"

using namespace game;

class DXGame : public Game
{	
  public:
    DXGame();
    //Constructor with(hInstance, nameWindowGame, widthScreen, heightScreen, frameRate)
    DXGame(HINSTANCE, const char*, int, int, DWORD);	
    virtual void Run();
    virtual ~DXGame();

  protected:
    //Function processing event windows
    static LRESULT CALLBACK WindowProc(HWND, UINT, WPARAM, LPARAM);

    virtual bool Init();
    virtual bool LoadContent() = 0;
    virtual void Update(unsigned int = 0) = 0;
    virtual void Render(unsigned int = 0) = 0;

    GameGraphic* pGraphic;			//Pointer to graphic manager
    GameInput* pInput;				//Pointer to input manager
    GameSound* pSound;				//Pointer to sound manager
		
  private:
    virtual bool IsGameOver() = 0;	//Check gameover

    HINSTANCE hInstance;			//Handle instance program
    HWND hWnd;						//Handle window program
    LPCTSTR lpWndClassName;			//Const string window class name
    LPCTSTR lpWndName;				//Const string window name
    int widthScreen;				//Width of screen
    int heightScreen;				//Height of screen
    const DWORD frameRate;			//Number frames per second
};

#endif